package xiaolicarrental.service.impl;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import xiaolicarrental.mapper.CarMapper;
import xiaolicarrental.model.Car;
import xiaolicarrental.service.CarService;

import java.util.List;


@Slf4j
@Service
public class CarServiceImpl implements CarService {

    @Autowired
    CarMapper carMapper;
    @Override
    public List<Car> list() {
        return carMapper.list();
    }

    @Override
    public Car getById(Integer id) {
        return carMapper.getById(id);
    }

    @Override
    public void add(Car car) {

        carMapper.add(car);
    }

    @Override
    public void deleteById(Integer id) {
        carMapper.deleteById(id);
    }

}
